Skip to content

Conversation

@TreWilkins
Copy link
Contributor

Description

Refactored the Telephony API wrapper to properly handle user-provided parameters, ensuring that mintime and other arguments are correctly passed in V2 requests. Updated get_telephony_log to avoid incorrect kwargs nesting and allow proper extraction of parameters.

Motivation and Context

This change is required because user-provided arguments, including mintime, were not being sent in Telephony V2 requests due to incorrect kwargs handling. This fixes the issue by ensuring that parameters are correctly extracted and included in the request.

Fixes: #285

How Has This Been Tested?

  • Added tests to validate that mintime and other parameters are correctly passed in V2 requests.
  • Verified the request parameters manually to confirm correct behavior.
  • Ran existing test suites to ensure no regressions in functionality.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@jay-law
Copy link

jay-law commented Mar 3, 2025

@AaronAtDuo Can this get a review please?

@AaronAtDuo
Copy link
Contributor

@TreWilkins I love the overall restructuring, but I have concerns about some of the stuff you've deleted. In theory, this could constitute a backwards-incompatible change, if anyone has written scripts that directly call some of the lower--level code/utils that you propose to delete or move. This is not necessarily a showstopper, but we try to avoid removing public code with little warning. We'd also need to save this change for a major version change; that would delay this change from merging.

Would you like to try to tweak your changes to maintain backwards compatibility, or are you ok waiting for a major version increment?

@TreWilkins
Copy link
Contributor Author

@TreWilkins I love the overall restructuring, but I have concerns about some of the stuff you've deleted. In theory, this could constitute a backwards-incompatible change, if anyone has written scripts that directly call some of the lower--level code/utils that you propose to delete or move. This is not necessarily a showstopper, but we try to avoid removing public code with little warning. We'd also need to save this change for a major version change; that would delay this change from merging.

Would you like to try to tweak your changes to maintain backwards compatibility, or are you ok waiting for a major version increment?

@AaronAtDuo Thanks for the feedback! To maintain backward compatibility, I've restored the deleted files and updated some type hints and formatting. I believe this should now be good to go.

@AaronAtDuo AaronAtDuo merged commit b357623 into duosecurity:master May 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User-Provided Arguments Not Being Sent in Telephony V2 Requests

3 participants